﻿using System;
using System.Collections.Generic;
using System.Web.Mvc;

namespace OnePiece.Ui.Controls
{
    public class GridUtility
    {
        public static JsonResult ErrorGridInfo(Exception ex)
        {
            return new JsonResult {Data = new
                                              {
                                                  page = 1, 
                                                  total = 0, 
                                                  rows = new List<string>().ToArray(), 
                                                  error = ex.Message
                                              } };
        }
    }
}
